﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            Person P = new Person();
            P.Name = "张三";
            P.Age = 22;
            P.Sex = "男";
            IBehavior p4 = P;
            p4.Walk();
            Console.WriteLine("姓名:{0},年龄：{1}岁,性别：{2},", P.Name, P.Age, P.Sex);


            Teacher teacher = new Teacher();
            teacher.Name = "李四";
            teacher.Age = 28;
            teacher.Sex = "男";
            IWorker worker = teacher;
            worker.Sal = 8600;
            worker.WorkYear = 4.5;
            Console.WriteLine("姓名{0}，年龄：{1}岁，性别：{2}，工资{3}，工作年份{4}年",teacher.Name,teacher.Age,teacher.Sex,worker.Sal,worker.WorkYear);




            Interface1 s = new Person();
            s.Print();


        }
    }
}
